import React from 'react'
import PropTypes from 'prop-types'
// import UserStore from '../../stores/user_store'
import { withStyles } from 'material-ui/styles'
import style from './style/recent_item'
import CommonItem from './commen_item'

class UserCollection extends React.Component {
  constructor() {
    super()
    this.state = {

    }
  }
  componentDidMount() {

  }
  render() {
    const { classes, collection } = this.props
    return (
      <div className={classes.collection}>
        {
          collection && collection.length ?
          collection.map(item => <CommonItem topic={item} key={item.id} />)
            :
          null
        }
      </div>
    )
  }
}
export default withStyles(style)(UserCollection)
UserCollection.propTypes = {
  collection: PropTypes.arrayOf(Object),
  classes: PropTypes.objectOf(Object),
}
